import request from '@/utils/request';

//获取当前用户聚合信息，	用户代理委托  用户授权功能点	是否为超级管理员	用户所属角色	用户授权主菜单	用户信息
export async function findUserAggregateInfoApi() {
  return request('/securityNew/findUserAggregateInfo', {
    method: 'POST',
    data: {},
    serviceId: 'fwSecurity',
  });
}

export function updateCurrentUserMode(payload: any) {
  return request('/securityNew/updateCustUserInfo', {
    method: 'POST',
    data: payload,
    serviceId: 'fwSecurity',
  });
}

//获取当前用户信息，已废弃
export async function getUserByUserLoginNameApi(params: any) {
  return request('/security/getUserByUserLoginName', {
    method: 'POST',
    data: params,
    serviceId: 'fwSecurity',
  });
}

export async function getUserByIdApi(params: any) {
  return request('/security/getUserById', {
    method: 'POST',
    data: params,
    serviceId: 'fwSecurity',
  });
}

//获取消息列表
export async function queryNotices() {
  return request('/notices', {});
}
